#ifndef HDRRENDERING_H
#define HDRRENDERING_H
//using namespace glsl;
class HDRRendering
{
    public:
        // Default constructor
        HDRRendering(void);
        
        // Variables
        ShaderObj * shaderProgObject;
        ShaderObj * shaderProgFrame;
        ShaderObj * shaderProgBlur;
        ShaderObj * shaderProgFrameBright;
        ShaderObj * shaderProgSCurve;
        ShaderObj * shaderProgNoToneMap;
        ShaderObj * shaderProgBloom;
        ShaderObj * shaderProgRahman;
        char *fileEnvReflection;
        char *fileEnvDiffuse;
        HDRLoaderResult resultHDR;
        float * floatHDRImage;
        int floatHDRImageWidth;
        int floatHDRImageHeight;
        GLuint hdrTexReflection, hdrTexDiffuse;
        GLuint testTex;
        GLUquadric *quadric;
        
        //GLint locationCubeTex = -1;
        
        GLenum m_target;
        
        // Member functions
        void drawSkyBox(float s);
        void drawScene(Vector3 camPos);
        void renderFrame(GLuint texID, GLfloat exposure);
        void renderFrameBright(GLuint texID, GLfloat threshold);
        void renderFrameBlurred(GLuint texID, GLuint w, GLuint h);
        void renderFrameComposed(GLuint blurred1, GLuint blurred2, GLuint blurred3, GLuint blurred4, GLuint frame, GLfloat exposure, GLfloat threshold, GLuint shaderIndex);
        
        void drawTexturedSphere(float r, int segs);
        void setupShaders(void);
        float * getPixel(int x, int y);
        GLuint createCubeMap(GLenum format);
};

#endif
